package com.zuipin.service;

import java.util.List;

import com.zuipin.entity.SysUser;
import com.zuipin.framework.result.Result;
import com.zuipin.util.Pagination;

import net.sf.json.JSONObject;

public interface ISysUserService {
	
	// 通过用户名密码验证登陆
	public SysUser login(JSONObject obj);
	
	// 通过用户名查找用户信息
	public SysUser findByAccount(String account);
	
	public SysUser findById(Long id);
	
	public void insert(SysUser sysUser);
	
	public void update(SysUser sysUser);
	
	public List<SysUser> findByIds(List<Long> ids);
	
	/**
	 * 通用查询
	 * @date 2017-9-15 08:38:56
	 * @author zhuangjiajian
	 * @param sysUser
	 * @param page 
	 */
	public List<SysUser> findBySysUserSelected(SysUser sysUser, Pagination page);
	
	public Result<SysUser> saveUser(SysUser sysUser, String roleIds);
	
	public Result<SysUser> updatePassword(Long userId, String oldPassWord, String newPassWord, Long updateId);
	
	public Result<SysUser> resetPassWord(Long userId, String newPassWord, Long updateId);
	
	public Result<SysUser> checkUserPassWord(Long userId, String passWord);
	
}
